-
Notifications
You must be signed in to change notification settings - Fork 299
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merge max-next-v2016.07-1 into next #945
Conversation
Added a long description of the "feature cache" and how it supports reconnecting to a running QEMU. Added a restriction so that the cache is only considered for the first feature negotiation performed by a vhost-user app instance. This is to avoid using the cached features when renegotiating with a guest e.g. when the guest has switched to a new driver. Not yet tested.
Now it is possible to request specific alignment for DMA memory. This is practical. For example, Mellanox ConnectX-4 requires specific alignments (e.g. 4KB). (cherry picked from commit f349c41)
… into max-next
|
||
*Optional*. Start the app. At this the `input` and `output` link tables are | ||
populated, and `appname` is set. The app can perform additional initialization | ||
if required. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The details of this callback are surprising to me.
Based on the name start
I would expect the callback to be run once when an app instance is first created and before any traffic is processed. Looking at the code it seems like start()
is actually always called, on every app instances, each time you run engine.configure()
(even if your new config is identical to the old one).
Could you please update either the name, the description, or the implementation to make the behavior & appropriate uses more obvious?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@eugeneia @lukego I agree with Luke's point of view, the snippet of code is run every time I'm OK with calling it |
Ugh I fat-fingered the close button, sorry! @dpino I would say |
@eugeneia Taking a look at Alexander's patch I think it makes sense to call it |
Thanks for the name change! I would still like to address these issues before merge:
|
I would like to please withdraw my objection to the implementation of I checked how the So my only request now is to please reconcile |
I think I can explain best what I need if I describe the use cases I'm trying to fix. I would like to give apps a chance to complete their initialization once they have been configured (with their links setup too). One example that could take advantage of this new event is the NDP app in the lwAFTR. https://github.com/Igalia/snabb/blob/lwaftr/src/apps/lwaftr/ipv6_apps.lua#L186 There's a case where the NDP app needs to send Neighbour Solicitation packets until a parameter is resolved ( It could be argued that the links won't be processed until Another use case is creating counters by app name. An app name is added to an app on function App:push ()
if not self.added_counters then
self.counter = counter.open(self.appname.."/counter")
self.added_counters = true
end
local input, output = assert(self.input.input), assert(self.output.output)
while not link.empty(input) do
...
end
end I think a method where apps could further initialize themselves (in Solutions I can think of:
function apply_config_actions (actions, conf)
...
local started_apps = {}
function ops.start (name)
...
table.insert(started_apps, app)
end
-- Setup links.
...
for _, app in ipairs(started_apps) do
if app.start then app:start() end
end
end |
@diego Thanks for providing that context. That helps a lot. How about implementing this all locally in the function NDP:push ()
self:maybe_send_ns()
... process packets ...
end
-- Send rate-limited neighbor solicitation message.
function NDP:maybe_send_ns ()
self.next_ns_time = self.next_ns_time or engine.now() -- first message is immediate
if self.next_ns_time <= engine.now() then
self:send_ns()
self.next_ns_time = engine.now() + self.ns_interval
end
end This seems neat, predictable, and non-bloated to me. The Note that WDYT? Incidentally I would quite like to have a |
@lukego Thanks for the detailed explanation, I like this new design more. In fact, before I needed to add a |
Merged. Thanks and sorry about the wait! |
Missing statements in snabb-softwire-v2 schema
Includes: #889 #866 #904 #905 #934 #935 #936